package com.lucker.ds.model;

import java.math.BigDecimal;

/**
 * cai_piao_miss_type
 * @author 
 */
public class CaiPiaoMissType extends BaseValueObject {
    private Long id;

    /**
     * 遗漏类型ID
     */
    private Long missTypeId;

    /**
     * 遗漏类型名称
     */
    private String missTypeName;

    /**
     * 遗漏类型父ID
     */
    private Long missTypeParentId;

    /**
     * 理论循环周期
     */
    private BigDecimal theoryCycle;

    /**
     * 中奖概率
     */
    private BigDecimal probability;

    /**
     * 最大当前遗漏
     */
    private Integer maxCurrentMissValue;

    /**
     * 彩票ID
     */
    private Long caiId;

    /**
     * 彩票类型ID
     */
    private Long caiTypeId;

    /**
     * 状态  1正常遗漏 2高遗漏  3极高遗漏
     */
    private Short status;

    private String customQuerySqlText = null;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMissTypeId() {
        return missTypeId;
    }

    public void setMissTypeId(Long missTypeId) {
        this.missTypeId = missTypeId;
    }

    public String getMissTypeName() {
        return missTypeName;
    }

    public void setMissTypeName(String missTypeName) {
        this.missTypeName = missTypeName;
    }

    public Long getMissTypeParentId() {
        return missTypeParentId;
    }

    public void setMissTypeParentId(Long missTypeParentId) {
        this.missTypeParentId = missTypeParentId;
    }

    public BigDecimal getTheoryCycle() {
        return theoryCycle;
    }

    public void setTheoryCycle(BigDecimal theoryCycle) {
        this.theoryCycle = theoryCycle;
    }

    public BigDecimal getProbability() {
        return probability;
    }

    public void setProbability(BigDecimal probability) {
        this.probability = probability;
    }

    public Integer getMaxCurrentMissValue() {
        return maxCurrentMissValue;
    }

    public void setMaxCurrentMissValue(Integer maxCurrentMissValue) {
        this.maxCurrentMissValue = maxCurrentMissValue;
    }

    public Long getCaiId() {
        return caiId;
    }

    public void setCaiId(Long caiId) {
        this.caiId = caiId;
    }

    public Long getCaiTypeId() {
        return caiTypeId;
    }

    public void setCaiTypeId(Long caiTypeId) {
        this.caiTypeId = caiTypeId;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public void setCustomQuerySqlText(String customQuerySqlText) {
        this.customQuerySqlText = customQuerySqlText;
    }

    public String getCustomQuerySqlText() {
        return customQuerySqlText;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByMissTypeId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by miss_type_id asc";
            }else{
                this.orderStr = this.orderStr + ",miss_type_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by miss_type_id desc";
            }else{
                this.orderStr = this.orderStr + ",miss_type_id desc";
            }
        }
    }

    public void orderByMissTypeName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by miss_type_name asc";
            }else{
                this.orderStr = this.orderStr + ",miss_type_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by miss_type_name desc";
            }else{
                this.orderStr = this.orderStr + ",miss_type_name desc";
            }
        }
    }

    public void orderByMissTypeParentId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by miss_type_parent_id asc";
            }else{
                this.orderStr = this.orderStr + ",miss_type_parent_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by miss_type_parent_id desc";
            }else{
                this.orderStr = this.orderStr + ",miss_type_parent_id desc";
            }
        }
    }

    public void orderByTheoryCycle(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by theory_cycle asc";
            }else{
                this.orderStr = this.orderStr + ",theory_cycle asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by theory_cycle desc";
            }else{
                this.orderStr = this.orderStr + ",theory_cycle desc";
            }
        }
    }

    public void orderByProbability(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by probability asc";
            }else{
                this.orderStr = this.orderStr + ",probability asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by probability desc";
            }else{
                this.orderStr = this.orderStr + ",probability desc";
            }
        }
    }

    public void orderByMaxCurrentMissValue(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by max_current_miss_value asc";
            }else{
                this.orderStr = this.orderStr + ",max_current_miss_value asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by max_current_miss_value desc";
            }else{
                this.orderStr = this.orderStr + ",max_current_miss_value desc";
            }
        }
    }

    public void orderByCaiId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by cai_id asc";
            }else{
                this.orderStr = this.orderStr + ",cai_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by cai_id desc";
            }else{
                this.orderStr = this.orderStr + ",cai_id desc";
            }
        }
    }

    public void orderByCaiTypeId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by cai_type_id asc";
            }else{
                this.orderStr = this.orderStr + ",cai_type_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by cai_type_id desc";
            }else{
                this.orderStr = this.orderStr + ",cai_type_id desc";
            }
        }
    }

    public void orderByStatus(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by status asc";
            }else{
                this.orderStr = this.orderStr + ",status asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by status desc";
            }else{
                this.orderStr = this.orderStr + ",status desc";
            }
        }
    }
}